package com.ye.pojo;

import com.alibaba.nacos.api.config.ConfigType;
import com.alibaba.nacos.api.config.annotation.NacosConfigurationProperties;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * @Description: TODO
 * @author: scott
 * @date: 2022年03月31日 19:52
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Configuration
//@ConfigurationProperties(prefix = "school")
@NacosConfigurationProperties(prefix = "school", dataId = "data-id-school", groupId = "DEFAULT_GROUP", autoRefreshed = true, ignoreInvalidFields = true, type = ConfigType.YAML)
public class School {
    private int id;
    private String name;
    private String address;
    @NotNull
    private Date date;
}
